package eda.hashTable;

/**
 * 
 * @author Pedro
 * Classe criada para auxiliar na construcao do hash com probe
 * @param <K>
 * @param <V>
 */

public class HashProbeElement<K, V> extends HashTableElement<K, V> {
	
	private boolean isDeleted;

	public HashProbeElement(K key, V value){
		super(key, value);
		this.isDeleted = false;
	}
	
	public void setDeleted(boolean deleted){
		this.isDeleted = deleted;
	}
	
	public boolean isDeleted(){
		return this.isDeleted;
	}

	@Override
	public String toString(){
		return !isDeleted ? "("+key.toString()+":"+value.toString()+")" : "DELETED";
	}
	
}